﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace IURIP
{
    /// <summary>
    /// The IProcess interface.
    /// </summary>
    public interface IProcess : IRunable
    {
        /// <summary>
        /// Gets or sets the original data. If sets this value, the first action will use the data and then shoule reset the value to null.
        /// </summary>
        XmlNode OriginalDataXml { get; set; }
        /// <summary>
        /// Gets or sets the target data.
        /// </summary>
        XmlDocument TargetDataXml { get; set; }
        /// <summary>
        /// Gets or sets the filter from the target relationship for the first action to get data
        /// </summary>
        IFilter FilterFromTargetRelationship { get; set; }
        /// <summary>
        /// Gets or sets the key from target relationship to identify the process, like a foreign key
        /// </summary>
        string KeyFromTargetRelationship { get; set; }
        /// <summary>
        /// Gets the process is stopped or not. All the runable object will check in run function to know how to do:run, pause or stop
        /// </summary>
        bool Stopped { get; }
        /// <summary>
        /// Gets or sets the key string from process template, like a primary key
        /// </summary>
        string RawKey { get; set; }

        /// <summary>
        /// Stop this process.
        /// </summary>
        void Stop();
    }
}
